namespace Master_Details_view.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using System.Data;
    using System.Data.Entity;
    using System.Data.SqlClient;
    using System.Collections;
    using System.Collections.Generic;
    using Master_Details_view.Models;

    internal sealed class Configuration : DbMigrationsConfiguration<Master_Details_view.Models.UsersContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }

        protected override void Seed(Master_Details_view.Models.UsersContext context)
        {
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method 
            //  to avoid creating duplicate seed data. E.g.
            //
            //    context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
            //

            context.Users.AddOrUpdate(u => u.Id,
                new User { Id = 1, Name = "Jesse Hunter", Email = "jhunter0@youtube.com" },
                new User { Id = 2, Name = "Lois Black", Email = "lblack1@simplemachines.org" },
                new User { Id = 3, Name = "Maria Gardner", Email = "mgardner2@ebay.co.uk" },
                new User { Id = 4, Name = "Michelle Harris", Email = "mharris3@tripod.com" },
                new User { Id = 5, Name = "Virginia Berry", Email = "vberry4@simplemachines.org" },
                new User { Id = 6, Name = "Donna Rogers", Email = "drogers5@goo.gl" },
                new User { Id = 7, Name = "Julie Schmidt", Email = "jschmidt6@blog.com" },
                new User { Id = 8, Name = "Katherine Gutierrez", Email = "kgutierrez7@cisco.com" },
                new User { Id = 9, Name = "Russell Shaw", Email = "rshaw8@uol.com.br" },
                new User { Id = 10, Name = "Judy Henderson", Email = "jhenderson9@w3.org" }
                );
            context.Addresses.AddOrUpdate(a => a.Id,
                new Address { Id = 1, Street = "Toban", House = "36", City = "Fayetteville", State = "North Carolina", Country = "United States", Zip = "54789-3659", UserId = 9 },
                new Address { Id = 2, Street = "Esch", House = "2578", City = "Oregon", State = "Ohio", Country = "United States", Zip = "21262-5089", UserId = 5 },
                new Address { Id = 3, Street = "Holmberg", House = "2144", City = "Montrose", State = "Colorado", Country = "United States", Zip = "45201", UserId = 6 },
                new Address { Id = 4, Street = "Susan", House = "541", City = "Meriden", State = "Connecticut", Country = "United States", Zip = "96830", UserId = 4 },
                new Address { Id = 5, Street = "Meadow Valley", House = "7643", City = "Holbrook", State = "New York", Country = "United States", Zip = "41878", UserId = 10 },
                new Address { Id = 6, Street = "Forest", House = "85075", City = "Machesney Park", State = "Illinois", Country = "United States", Zip = "49900-2650", UserId = 6 },
                new Address { Id = 7, Street = "Fairfield", House = "3297", City = "Georgetown", State = "Texas", Country = "United States", Zip = "44698", UserId = 6 },
                new Address { Id = 8, Street = "Emmet", House = "2485", City = "Bonita Springs", State = "Florida", Country = "United States", Zip = "92364-7084", UserId = 8 },
                new Address { Id = 9, Street = "Twin Pines", House = "34369", City = "Rohnert Park", State = "California", Country = "United States", Zip = "93078-2019", UserId = 3 },
                new Address { Id = 10, Street = "Del Sol", House = "7120", City = "Ontario", State = "California", Country = "United States", Zip = "94711-5963", UserId = 10 },
                new Address { Id = 11, Street = "Onsgard", House = "231", City = "Ramsey", State = "Minnesota", Country = "United States", Zip = "38277-9228", UserId = 5 },
                new Address { Id = 12, Street = "Merchant", House = "26317", City = "Wilmette", State = "Illinois", Country = "United States", Zip = "92056", UserId = 10 },
                new Address { Id = 13, Street = "Golf", House = "974", City = "Plainfield", State = "Connecticut", Country = "United States", Zip = "32074", UserId = 3 },
                new Address { Id = 14, Street = "Bartillon", House = "478", City = "Farmers Branch", State = "Texas", Country = "United States", Zip = "73443-7513", UserId = 1 },
                new Address { Id = 15, Street = "Birchwood", House = "16", City = "Waynesboro", State = "Virginia", Country = "United States", Zip = "31259", UserId = 9 },
                new Address { Id = 16, Street = "Shopko", House = "7", City = "Manhattan", State = "New York", Country = "United States", Zip = "72382-8167", UserId = 10 },
                new Address { Id = 17, Street = "Cherokee", House = "9", City = "Spring Valley", State = "New York", Country = "United States", Zip = "67257", UserId = 3 },
                new Address { Id = 18, Street = "Miller", House = "7", City = "Cabot", State = "Arkansas", Country = "United States", Zip = "75408", UserId = 9 },
                new Address { Id = 19, Street = "Sundown", House = "028", City = "Sylvania", State = "Ohio", Country = "United States", Zip = "21064-1474", UserId = 3 },
                new Address { Id = 20, Street = "Hovde", House = "12", City = "Springfield", State = "Virginia", Country = "United States", Zip = "02652-5290", UserId = 8 },
                new Address { Id = 21, Street = "David", House = "97", City = "Hollywood", State = "California", Country = "United States", Zip = "13518-2733", UserId = 5 },
                new Address { Id = 22, Street = "Mosinee", House = "00428", City = "Columbus", State = "Nebraska", Country = "United States", Zip = "39392", UserId = 2 },
                new Address { Id = 23, Street = "Park Meadow", House = "67833", City = "Oak Park", State = "Michigan", Country = "United States", Zip = "40986", UserId = 6 },
                new Address { Id = 24, Street = "East", House = "64", City = "Depew", State = "New York", Country = "United States", Zip = "44911", UserId = 3 },
                new Address { Id = 25, Street = "Truax", House = "65158", City = "Ashtabula", State = "Ohio", Country = "United States", Zip = "36947-1219", UserId = 7 }
                );
        }
    }
}
